package com.jiangjiang.eshop.membership.convert;

import com.jiangjiang.eshop.membership.dto.UserAccountDTO;
import com.jiangjiang.eshop.membership.domain.UserAccountEntity;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import java.util.List;

/**
 * @ClassName UserAccountConvert
 * @Description TODO
 * @Author jhw
 * @Date 2021/8/21 12:13
 * @Version 1.0
 **/
@Mapper(componentModel = "spring")
public interface UserAccountConvert {
    @Mappings({
            @Mapping(target = "id", ignore = true)
    })
    UserAccountEntity convertDOT2Entity(UserAccountDTO dto);

    UserAccountDTO convertEntity2DTO(UserAccountEntity userAccountEntity);

    List<UserAccountDTO> convertEntities2DTOList(List<UserAccountEntity> entities);
}
